<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/fMatrix.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('fMatrix_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/fMatrix.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="edgeID_8h_source.html">edgeID.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for fMatrix.h:</div>
<div class="dyncontent">
<div class="center"><img src="fMatrix_8h__incl.png" border="0" usemap="#includes_2fMatrix_8h" alt=""/></div>
<map name="includes_2fMatrix_8h" id="includes_2fMatrix_8h">
<area shape="rect" id="node5" href="edgeID_8h.html" title="edgeID.h" alt="" coords="81,83,156,112"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="fMatrix_8h__dep__incl.png" border="0" usemap="#includes_2fMatrix_8hdep" alt=""/></div>
<map name="includes_2fMatrix_8hdep" id="includes_2fMatrix_8hdep">
<area shape="rect" id="node3" href="LTMFrequencies_8h.html" title="contiene le tabelle delle frequenze di ogni camion" alt="" coords="5,83,187,112"/><area shape="rect" id="node5" href="ltm_8h.html" title="rappresenta il livello LTM dell&#39;algoritmo UCARPP" alt="" coords="45,160,147,189"/></map>
</div>
</div>
<p><a href="fMatrix_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structFMatrix.html">FMatrix</a></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structFMatrix.html">FMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#a8a901cdebb0ed571a8e799cb7a054aa2">FMatrix</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structFMatrix.html">FMatrix</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#a7defd653ae70ab4e5c14d9b83af7687b">initFMatrix</a> (int *N)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#ad13289410a6bf3447e072952dc0d7648">freeFMatrix</a> (<a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> obj)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#a803de77328e2d291a03f21f37783e9fd">printFMatrix</a> (FILE *f, <a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> pmatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#ac53112f00db71820d6536aa3bd49eeac">setFMatrixValue</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> pmatrix, int value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#a9d44cd2b0f0fc46e4604a15dbde9365c">getFMatrixValue</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> pmatrix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fMatrix_8h.html#a5db35ebb9935c2046bf18277d7793f4f">addFMatrixValue</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> pmatrix, int value)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a8a901cdebb0ed571a8e799cb7a054aa2"></a><!-- doxytag: member="fMatrix.h::FMatrix" ref="a8a901cdebb0ed571a8e799cb7a054aa2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structFMatrix.html">FMatrix</a>  <a class="el" href="structFMatrix.html">FMatrix</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rappresenta quante volte un arco è stato in soluzione da un particolare camion </p>

</div>
</div>
<a class="anchor" id="a4bf905567a82e681e7bd3ce7d2a21745"></a><!-- doxytag: member="fMatrix.h::PfMatrix" ref="a4bf905567a82e681e7bd3ce7d2a21745" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structFMatrix.html">FMatrix</a>* <a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>puntatore di servizio </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a5db35ebb9935c2046bf18277d7793f4f"></a><!-- doxytag: member="fMatrix.h::addFMatrixValue" ref="a5db35ebb9935c2046bf18277d7793f4f" args="(PedgeID pid, PfMatrix pmatrix, int value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="fMatrix_8h.html#a5db35ebb9935c2046bf18277d7793f4f">addFMatrixValue</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td>
          <td class="paramname"><em>pmatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>somma il valore all'interno della matrice puntato da pid con quello passato come parametro. E' <b>altamente consigliato</b> utilizzare questa funzione per aggiornare valori nella matrice.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pid non NULL </li>
<li>pid validato </li>
<li>pmatrix non NULL </li>
<li>pid puntante una zona in matrice esistente </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>pmatrix=value o se minore di zero, zero </li>
<li>campo minimum aggiornato correttamente</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pid</td><td>l'ID dell'arco da modificare </td></tr>
    <tr><td class="paramname">pmatrix</td><td>la matrice da modificare </td></tr>
    <tr><td class="paramname">value</td><td>il valore da sommare al valore contenuto nella matrice </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad13289410a6bf3447e072952dc0d7648"></a><!-- doxytag: member="fMatrix.h::freeFMatrix" ref="ad13289410a6bf3447e072952dc0d7648" args="(PfMatrix obj)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="fMatrix_8h.html#ad13289410a6bf3447e072952dc0d7648">freeFMatrix</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>dealloca un oggetto di tipo <a class="el" href="structFMatrix.html">FMatrix</a> dalla memoria, liberandola</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>obj non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>la memoria viene liberata dall'oggetto </li>
<li>la cella puntata da N <b>non</b> viene alterata</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>l'oggetto da deallocare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9d44cd2b0f0fc46e4604a15dbde9365c"></a><!-- doxytag: member="fMatrix.h::getFMatrixValue" ref="a9d44cd2b0f0fc46e4604a15dbde9365c" args="(PedgeID pid, PfMatrix pmatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="fMatrix_8h.html#a9d44cd2b0f0fc46e4604a15dbde9365c">getFMatrixValue</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td>
          <td class="paramname"><em>pmatrix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>funzione usata per reperire valori dalla matrice <a class="el" href="structFMatrix.html">FMatrix</a></p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pid non NULL </li>
<li>pid validato </li>
<li>cella della matrice puntata da pid esistente </li>
<li>pmatrix non NULL</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pid</td><td>l'arco di cui reperire la frequenza </td></tr>
    <tr><td class="paramname">pmatrix</td><td>la matrice per cui attuare il get </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>la frequenza dell'arco </dd></dl>

</div>
</div>
<a class="anchor" id="a7defd653ae70ab4e5c14d9b83af7687b"></a><!-- doxytag: member="fMatrix.h::initFMatrix" ref="a7defd653ae70ab4e5c14d9b83af7687b" args="(int *N)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> <a class="el" href="fMatrix_8h.html#a7defd653ae70ab4e5c14d9b83af7687b">initFMatrix</a> </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>N</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce una nuova istanza di <a class="el" href="structFMatrix.html">FMatrix</a></p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>N non NULL </li>
<li>N non contiene un valore negativo o nullo </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una nuova istanza di <a class="el" href="structFMatrix.html">FMatrix</a> è allocata in memoria. Deve essere deallocata <b>manualmente</b> </li>
<li>la matrice e' inizializzata a valori 0 </li>
<li>il campo minimo è inizializzato a valore 0</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">N</td><td>una cella di memoria in cui e' contenuto i valore del numero di nodi del grafo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore ad una nuova istanza di <a class="el" href="structFMatrix.html">FMatrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a803de77328e2d291a03f21f37783e9fd"></a><!-- doxytag: member="fMatrix.h::printFMatrix" ref="a803de77328e2d291a03f21f37783e9fd" args="(FILE *f, PfMatrix pmatrix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="fMatrix_8h.html#a803de77328e2d291a03f21f37783e9fd">printFMatrix</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td>
          <td class="paramname"><em>pmatrix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>stampa la matrice delle frequenze</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>f aperto in scrittura </li>
<li>pmatrix non NULL </li>
<li>f non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>il file f viene modificato</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il file su cui scrivere la matrice </td></tr>
    <tr><td class="paramname">pmatrix</td><td>la matrice da stampare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac53112f00db71820d6536aa3bd49eeac"></a><!-- doxytag: member="fMatrix.h::setFMatrixValue" ref="ac53112f00db71820d6536aa3bd49eeac" args="(PedgeID pid, PfMatrix pmatrix, int value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="fMatrix_8h.html#ac53112f00db71820d6536aa3bd49eeac">setFMatrixValue</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td>
          <td class="paramname"><em>pmatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>imposta il valore all'interno della matrice puntato da pid a quello passato come parametro. E' <b>altamente consigliato</b> utilizzare questa funzione per impostare valori nella matrice.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pid non NULL </li>
<li>pid validato </li>
<li>pmatrix non NULL </li>
<li>pid puntante una zona in matrice esistente </li>
<li>value positivo o 0 </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>pmatrix=value </li>
<li>campo minimum aggiornato correttamente </li>
<li>campo minimumNumber aggiornato correttamente</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pid</td><td>l'ID dell'arco da modificare </td></tr>
    <tr><td class="paramname">pmatrix</td><td>la matrice da modificare </td></tr>
    <tr><td class="paramname">value</td><td>il valore da inserire nella matrice </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="fMatrix_8h.html">fMatrix.h</a>      </li>

    <li class="footer">Generated on Wed Sep 4 2013 06:38:56 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
